package stopwatch.dto;

import stopwatch.DisplayColor;

public class FlowData
{
	public static int RUN = 1;
	public static int STOP = 2;
	public static int PAUSE = 3;
	public static int SET = 4;

	private int command = RUN;

	private int seconds = 0;

	private int secondsStop = 0;

	private DisplayColor color = DisplayColor.RED;

	public FlowData() {}

	public FlowData(int seconds, DisplayColor color, int command)
	{
		this.seconds = seconds;
		this.color = color;
		this.command = command;
	}

	public FlowData(int secondsStart, int secondsStop, DisplayColor color, int command)
	{
		this.seconds = secondsStart;
		this.setSecondsStop(secondsStop);
		this.color = color;
		this.command = command;
	}

	public int getSeconds()
	{
		return seconds;
	}

	public void setSeconds(int seconds)
	{
		this.seconds = seconds;
	}

	public int getSecondsStop()
	{
		return secondsStop;
	}

	public void setSecondsStop(int secondsStop)
	{
		this.secondsStop = secondsStop;
	}

	public int subtractSeconds(int seconds)
	{
		return (this.seconds -= seconds);
	}

	public int getCommand()
	{
		return command;
	}

	public void setCommand(int command)
	{
		this.command = command;
	}

	public DisplayColor getColor()
	{
		return color;
	}

	public void setColor(DisplayColor color)
	{
		this.color = color;
	}

	@Override
	public String toString()
	{
		return "FlowData [command=" + command + ", seconds=" + seconds
				+ ", color=" + color + "]";
	}

}
